import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/employee/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/employee/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/employee/logout',
    method: 'post',

  })
}
export function getEmployeeList(params) {
  return request({
    url: '/employee/page',
    method: 'get',
    params
  })
}
export function getById(employeeId) {
  return request({
    url: '/employee/getById',
    method: 'get',
    params:{
      employeeId
    }

  })
}
export function editEmployee(data) {
  return request({
    url: '/employee',
    method: 'put',
    data
  })
}
